import { ChooseQo } from '@/services/quest';
import { OptionsResult } from '@/store/answer/types';
// import { OptionsResult } from '@/store/answer/types';
import { Choose } from '../../types';
import ChosesAdapter from './ChosesAdapter';

export default class ChosesListAdapter {
  parse(value: Choose[]): ChooseQo[] {
    const vo: ChooseQo[] = [];
    value.map((item: Choose) => vo.push(new ChosesAdapter().parse(item)));
    return vo;
  }

  compose(value: OptionsResult[], sum?: number): Choose[] {
    const result: Choose[] = [];
    value.forEach((item) => {
      result.push(new ChosesAdapter().compose(item, sum));
    });

    return result;
  }
}
